import requests
from pyquery import PyQuery as pq


headers={
    'Referer':'https://www.lagou.com/jobs/list_python?labelWords=&fromSearch=true&suginput=',
    'user-agent':'Mozilla/5.0'
}
data={
    'first': 'true',
    'pn': '1',
    'kd': 'python'
}
r=requests.post('https://www.lagou.com/jobs/list_python?labelWords=&fromSearch=true&suginput=',data=data,headers=headers)

r.encoding=r.apparent_encoding
html=r.text
doc=pq(html)
lis=doc('.r_search_item')
print('拉钩网推荐python公司:')
i=0
print(type(r.json()))
for li in lis.items():
    i+=1
    if i%5==0:
        print()
    print(li.text(),end=" ")
